<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <ul>
        <li @click="showLog(data)" v-for="(data,index) in dataArray">{{index}}-我的名字是{{data.name}},今年{{data.age}}了</li>
    </ul>
    <div> {{msg}}</div>
</div>
<script>
    let vm = new Vue({
        el:'#app',
        data:{
            msg:'欢迎来到dap高级研发群',
            dataArray:[
                {name:'dap',age:18}
                , {name: '王老师', age: 38}
                , {name: 'pactera', age: 66}
                , {name: 'wangzibo', age: 28}
                , {name: '冰王子', age: 8}
            ]
        },
        methods:{
            showLog (data){
                alert(data.name)
            }
        }
    })
</script>

</body>
</html>